<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="__PUBLIC__/Css/common.css" />
	
	<script type="text/JavaScript" src='__PUBLIC__/Js/jquery-1.7.2.min.js'></script>
	<script type="text/JavaScript" src='__PUBLIC__/Js/common.js'></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/index.css" />
	
		
</head>
<body>
<!--头部-->
	<div class='top-list-wrap'>
		<div class='top-list'>
			<ul class='l-list'>
				<li><a href="#" target='_blank'>Fish网</a></li>
				<li><a href="#" target='_blank'>Fish网论坛</a></li>
				<li><a href="#" target='_blank'>Fish学习社区</a></li>
			</ul>
			<ul class='r-list'>
				<li><a href="#" target='_blank'>Thinkphp框架</a></li>
				<li><a href="#" target='_blank'>免费视频教程</a></li>
			</ul>
		</div>
	</div>


	<div class='top-search-wrap'>
		<div class='top-search'>
			<a href="#" target='_blank' class='logo'>
				<img src="__PUBLIC__/Images/logo.png"/>
			</a>
			<div class='search-wrap'>
				<form action="" method='get'>
					<input type="text" name='keyword' class='search-content'/>
					<input type="submit" name='search' value='搜索'/>
				</form>
			</div>
		</div>
	</div>


	<div class='top-nav-wrap'>
		<ul class='nav-lv1'>
			<li class='nav-lv1-li'>
				<a href="__ROOT__/h" class='top-cate'>博客首页</a>
			</li>
			<?php
 $cate=M('cate')->order("sort ASC")->limit("")->select(); import("class.Category",APP_PATH); $cate=Category::UnlimiteForLayer($cate); foreach($cate as $v): extract($v); $url='c_'.$id; ?><li class='nav-lv1-li'>
					<a href="__ROOT__/c_<?php echo ($id); ?>" class='top-cate'><?php echo ($name); ?></a>
					<ul>
					   <?php if(is_array($child)): foreach($child as $key=>$value): ?><li><a href="__ROOT__/c_<?php echo ($value["id"]); ?>"><?php echo ($value["name"]); ?></a></li><?php endforeach; endif; ?>
					</ul>
				</li><?php  endforeach ?>  
		</ul>
	</div>
<!--主体-->
	<div class='main'>
		<div class='main-left'>
			<p>后盾博文</p>
			<?php if(is_array($list)): foreach($list as $key=>$v): ?><dl>	   
					<dt><?php echo ($v["name"]); ?><a href="<?php echo U('/c_'.$v['id']);?>">更多>></a></dt>
						<?php if(is_array($v["blog"])): foreach($v["blog"] as $key=>$val): ?><dd>
								<a href="<?php echo U('/'.$val['id']);?>"><?php echo ($val["title"]); ?></a>
								<span><?php echo (date("m-d-Y H:i",$val["time"])); ?></span>
							</dd><?php endforeach; endif; ?>	
				</dl><?php endforeach; endif; ?>
		</div>

<!--主体-->

	<!-- <div class='main'>
		<div class='main-left'>
			<p>主题后盾博文</p>
			<?php if(is_array($cate)): foreach($cate as $key=>$v): ?><dl>
				<dt><?php echo ($v["name"]); ?><a href="<?php echo U('/list-'.$v['id']);?>">更多>></a></dt>
				<?php if(is_array($v["blog"])): foreach($v["blog"] as $key=>$val): ?><dd>
					<a href="<?php echo U('/show-'.$val['id']);?>"><?php echo ($val["title"]); ?></a>
					<span><?php echo (date('m/d', $val["time"])); ?></span>
				</dd><?php endforeach; endif; ?>
			</dl><?php endforeach; endif; ?>
		</div> -->
<!--主体右侧-->
		<div class='main-right'>
		    <dl>		       
				<dt>热门博文</dt>
				<?php $blog=M("blog")->limit("4")->order("click DESC")->select();foreach ($blog as $val): ;extract($val);$url=U("/".$id); ?><dd>
						<a href='<?php echo ($url); ?>'><?php echo ($title); ?></a>
						<span>(<?php echo ($click); ?>)</span>
					</dd><?php endforeach ; ?>		
			</dl>
			<!-- <?php echo W('Hot',array('limit'=>5));?> -->
      

			<dl>  
				<dt>最发布发</dt>
			<!-- 用自定义标签显示最新发布内容 -->	
			   <?php $blog_new=M("blog")->limit(5)->order("time DESC")->select();foreach($blog_new as $blog_new_v):extract($blog_new_v);$url=U("/".$id); ?><dd>
						<a href='<?php echo ($url); ?>'><?php echo ($title); ?></a>
						<span>(<?php echo ($click); ?>)</span>
					</dd><?php endforeach; ?>
			</dl>
		<!-- 用Widget工具显示最新发布内容 -->
         <!-- <?php echo W('New',array('limit=>5'));?> -->

         <!-- 用Widget工具显示友情链接内容 -->
         <?php echo W('Frie',array('limit'=>4));?>
			<!-- <dl>
				<dt>友情连接</dt>
				<?php $blog_hot=M("blog")->limit(4)->order("click DESC")->select();foreach($blog_hot as $blog_hot_v):;extract($blog_hot_v);$url=U("/".$id); ?><dd>
						<a href='<?php echo ($url); ?>'><?php echo ($title); ?></a>
					</dd><?php endforeach; ?>
			</dl> -->
		</div>
	</div>
	
	
<!--底部-->
	<div class='bottom'>
		<div></div>
	</div>
</body>
</html>